<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>修改密码</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--标准mui.css-->
		<link rel="stylesheet" href="css/mui.min.css">
		<link rel="stylesheet" href="css/style.css" />  
	    <link rel="stylesheet" href="css/iconfont.css" />
	    <link rel="stylesheet" href="css/css.css" />   
	</head>

	<body>
		<header class="mui-bar mui-bar-nav wdp_nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">修改密码</h1>
		</header>
		<div class="mui-content">
			<div class="mui-content-padded xiug_top">
				<div class="mui-input-row mui-password">
					<input type="password" class="mui-input-password" placeholder="请输入旧密码" id="old_pwd">
				</div>
				<div class="mui-input-row mui-password xiug_mm">
					<input type="password" class="mui-input-password" placeholder="请输入新密码" id="new_pwd">
				</div>
			</div>
			
			<div class="mui-content-padded flogin_btn">

				<button class="mui-btn mui-btn-block login_btn" id="login_out" style="background: #5DD71A;"> 确 定 修 改</button>

			</div>

		</div>
		<script src="js/mui.min.js"></script>
		<script>
			mui.init({
				swipeBack: true //启用右滑关闭功能
			});
		</script>
	</body>

</html>
<script type="text/javascript" src="/js/app.js"></script>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/layer/layer.min.js"></script>
<script>
	$("#login_out").click(function() {
		var   member = JSON.parse(localStorage.getItem('member'));
	  var     old_pwd1=document.getElementById("old_pwd").value;
	  var     new_pwd1=document.getElementById("new_pwd").value;
	           
	           
      $.ajax({
		
			//type: 'post',
			url: APP.api_url + 'member/getMember',
			data: {
			id:member['id'],
			old_pwd1:old_pwd1,
			new_pwd1:new_pwd1
			},
			dataType:'jsonp',
			success: function(data) {
			    if(data.code == 200){
			    	layer.msg(data.msg, {icon: 1,time:1500,shade: 0.1}, function(index){
					localStorage.removeItem('member');
                    window.location.href="login.html";
			    	})
			    }else{
			    	layer.msg(data.msg, {icon: 1,time:1500,shade: 0.1}, function(index){

                    window.location.href="";
			    })
			}	
			}
   
 }) 
	           
	           
	           
	           
});
	  
	
	
	
	</script>